#pragma once

#include "HashTable.h"

namespace hash_bucket
{
	template <class K>
	class unordered_set
	{
	public:
		struct SetKeyOfT
		{
			const K& operator()(const K& key)
			{
				return key;
			}
		};

		typedef typename HashBucket<K, K, SetKeyOfT>::const_iterator iterator;
		typedef typename HashBucket<K, K, SetKeyOfT>::const_iterator const_iterator;


		pair<iterator,bool> insert(const K& key)
		{
			pair<HashBucket<K, K, SetKeyOfT>::iterator, bool> ret = _hb.Insert(key);
			return make_pair(ret.first, ret.second);
		}

		const_iterator begin()const
		{
			return _hb.begin();
		}

		const_iterator end()const
		{
			return _hb.end();
		}


	private:
		HashBucket<K, K, SetKeyOfT> _hb;
	};
}

